@echo off
cd /d %~dp0

git pull && git fetch

taskkill /f /fi "WindowTitle eq cmd-video-discovery*" /T
taskkill /f /fi "WindowTitle eq cmd-video-auth*" /T
taskkill /f /fi "WindowTitle eq cmd-video-gateway*" /T

cd ..
start "video-auth" /wait cmd /c gradlew task video-auth:bootJar
start "video-discovery" /wait cmd /c gradlew task video-discovery:bootJar
start "video-gateway" /wait cmd /c gradlew task video-gateway:bootJar
REM start "video-user" /wait cmd /c gradlew task video-user:bootJar

start "cmd-video-discovery" cmd /k java -jar E:\git.d\video-api\video-discovery\build\libs\video-discovery-1.0-SNAPSHOT.jar
start "cmd-video-auth" cmd /k java -jar E:\git.d\video-api\video-auth\build\libs\video-auth-1.0-SNAPSHOT.jar
start "cmd-video-gateway" cmd /k java -jar E:\git.d\video-api\video-gateway\build\libs\video-gateway-1.0-SNAPSHOT.jar
REM start "cmd-video-user" cmd /k java -jar E:\git.d\video-api\video-user\build\libs\video-user-1.0-SNAPSHOT.jar
